﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ComputeLib
{
    public class CalculateManager : ICalculateManager
    {
        public object calculate(string caculation, Dictionary<string, object> inputVars)
        {
            ICalculation calculation = Global.calculations.Find(s => s.Name.Equals(caculation));

            ICalculationAction calculationAction = new CalculationAction(calculation);
            return calculationAction.calculate(inputVars);
        }

        
    }
}
